package org.visionlibrary.image.filters.thresholding;

import org.visionlibrary.image.model.PixelFilter;

public class SimpleThreshold extends PixelFilter {
	private int threshold = 128;
	
	public SimpleThreshold(int threshold) {
		super();
		this.threshold = threshold;
	}

	@Override
	protected int getNewPixelVal(int value) {
		if(value < threshold)
			return 255;
		
		return 0;
	}
}
